// src/api/auth.js
import axios from 'axios';

const API_URL = 'http://127.0.0.1:8000/qa'; // 替换为你的后端API地址

export const registerUser = (user) => {
  return axios.post(`${API_URL}/register/`, user, {
    headers: {
      'Content-Type': 'application/json'
    }
  });
};

export const loginUser = (user) => {
  return axios.post(`${API_URL}/login/`, user, {
    headers: {
      'Content-Type': 'application/json'
    }
  });
};
